$('.sf-menu').superfish({
  	delay:50,
    animation:{height:'show'},
    speed:200,
    autoArrows:false,
    dropShadows:false  
});
add_cart();
function add_cart(){
	$('.addtocart').click(function(){
		$pid = $(this).attr('pid');
		$('form#frm_product').find('input[name="pid"]').val($pid);
		$('form#frm_product').submit();
	});
}

//slideshow product
$('#slide-2').carouFredSel({
	auto: true,
	scroll: {
	items: 1,
	duration: 2000,
	easing: 'easeOutQuad'
	},
	mousewheel: false,
	swipe: {
	onMouse: true,
	onTouch: false
	},
	auto: {
	pauseOnHover: 'resume',
	fx: 'fade',
	timeoutDuration: 3000
	}
}); 

$(window).load(function(e) {
	$cu = $('#main-menu .active');
	if($cu.length == 0 ){
		$('li.home').addClass('active');
	}    
});
